import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:im_app/im/page/view/DraggableFloatingView.dart';

class WebRtcFloatingView extends StatelessWidget {

  final Widget child;
  final Function? onTapFunction;

  const WebRtcFloatingView({ required this.child, this.onTapFunction, super.key});

  @override
  Widget build(BuildContext context) {
    return DraggableFloatingView(child: GestureDetector(
      onTap: () { onTapFunction?.call(); },
      child: Material(
        elevation: 4.0,
        borderRadius: const BorderRadius.all(Radius.circular(10)),
        child: Container(
          width: 120,
          height: 150,
          color: Colors.white,
          child: Center(child: child,),
        ),
      ),
    ));
  }


}
